#pragma once
#include "cupid.h"

namespace cupid
{
class IMessagePort;
class ISocketKernel
{
public:
	virtual ~ISocketKernel() {}
	virtual	 ISocketKernel*	getInterface() { return NULL; }
	static ISocketKernel* createNew();
	virtual bool	create(IMessagePort* port)			=	0;
	virtual bool	processMsg(int idPacket, void* buf, int type, int from)	=	0;
	virtual bool	processSocket()						=	0;
	virtual bool	onTimer(time_t cur)					=	0;
	virtual bool	release()							=	0;
};
}